/**
 * ****************************************************************************
 * Project: RoboBridge
 * ----------------------------------------------------------------------------
 * -------------------------- [c]2012 - KrawallMann ---------------------------
 * ---------------------- http://www.krawallmann.de.tc/ -----------------------
 * ****************************************************************************
 * File: Exceptions.java Package: tc.de.krawallmann.robobridge.util Version: 1.0
 * Author(s): KrawallMann
 * ****************************************************************************
 * Description:
 * ****************************************************************************
 */
package tc.de.krawallmann.robobridge.util;

/**
 * The Class Exceptions provides helper functions for throwing Exceptions.
 * 
 * @author KrawallMann
 * @version 1.0
 */
public final class Exceptions {

	/**
	 * On null pointer.
	 * 
	 * @param caller
	 *            the caller
	 * @param name
	 *            the name
	 * @return the illegal argument exception
	 */
	public static IllegalArgumentException onNullPointer(final Object caller, final String name) {
		return new IllegalArgumentException(caller + ": " + name + " is null!");
	}

	/**
	 * Instantiates a new exceptions.
	 */
	private Exceptions() {
		super();
		// Private constructor
	}
}
